<template>
	<view class="box">
		<view @click="all(item.path)" v-for="(item,index) in list" class="flex qlist a-t">
			<view style="height: 90px;overflow: hidden;">
				<image :src="'https://yunkeososyunchuc.bc8t.cn/lianaikongjian/static/quwei/'+index+'.jpg'" mode="widthFix" style="width: 90px;margin-right: 10px;"></image>
			</view>
			<view>
				<view class="c3 f16 fb">
					{{item.name}}
				</view>
				<view class="c6 f12">
					{{item.title}}
				</view>
				<view class="flex a-t">
					<view class="f12 c6">
						<text class="c">
							{{item.num}}
						</text>
						人在玩
					</view>
				</view>
			</view>
			<view class="button f12" style="padding: 3px 12px;margin-left: auto;margin-right: 10px;">
				我也要玩
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {
				list:[
					{
						name:"爱情扭蛋机",
						title:'扭出情侣间的专属特权',
						num:"1234",
						path:'/pages/niu/niu'
					},
					
					/*
					{
						name:"三生石",
						title:'三生石',
						num:"1234",
						path:'/pages/sanshengshi/sanshengshi'
					},
					*/
					
					{
						name:"好友默契大挑战",
						title:'友情测试Ta有多懂你',
						num:"1234",
						path:'/pages/haoyou/haoyou'
					},
					{
						name:"新年姓氏头像",
						title:'免费生成你的专属新年姓氏头像',
						num:"1234",
						path:'/pages/touxiang/touxiang'
					},
					{
						name:"100岁的我们",
						title:'假如我们都活到100岁',
						num:"1234",
						path:'/pages/weilai/weilai'
					},
					
					/*
					{
						name:"狗窝",
						title:'狗窝',
						num:"1234",
						path:'/pages/Pagesgw/page1Outside'
					},
					*/
					
					{
						name:"姨妈助手",
						title:'姨妈期必备贴心神器',
						num:"1234",
						path:'/pages/yima/yima'
					},
					{
						name:"恋爱协议",
						title:'签署恋爱协议，谈一场甜蜜的恋爱',
						num:"1234",
						path:'/pages/xieyi/xieyi?type=恋爱协议'
					},
					{
						name:"闺蜜宣言",
						title:'好闺蜜一辈子，一起签署闺蜜协议',
						num:"1234",
						path:'/pages/xieyi/xieyi?type=闺蜜宣言'
					}
				]
			}
		},
		methods: {
			all(e){
                let self = this;

                // 纪念日
                if(e == '/pages/jinianri/jinianri'){
                    // #ifdef MP
                    if(self.vuex_site_config.sub_msg_anniversaries.wechat){
                        uni.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_anniversaries.wechat],
                            success (res) { }
                        })
                    }
                    // #endif

                    // #ifdef MP-TOUTIAO
                    if(self.vuex_site_config.sub_msg_anniversaries.byte){
                        tt.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_anniversaries.byte],
                            success (res) { }
                        })
                    }
                    // #endif
                }

                // 闹钟
                if(e == '/pages/naozhong/naozhong'){
                    // #ifdef MP
                    if(self.vuex_site_config.sub_msg_alarm_clock.wechat){
                        uni.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_alarm_clock.wechat],
                            success (res) { }
                        })
                    }
                    // #endif

                    // #ifdef MP-TOUTIAO
                    if(self.vuex_site_config.sub_msg_alarm_clock.byte){
                        tt.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_alarm_clock.byte],
                            success (res) { }
                        })
                    }
                    // #endif
                }

                // 姨妈助手
                if(e == '/pages/yima/yima'){
                    // #ifdef MP
                    if(self.vuex_site_config.sub_msg_assistant.wechat){
                        uni.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_assistant.wechat],
                            success (res) { }
                        })
                    }
                    // #endif

                    // #ifdef MP-TOUTIAO
                    if(self.vuex_site_config.sub_msg_assistant.byte){
                        tt.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_assistant.byte],
                            success (res) { }
                        })
                    }
                    // #endif
                }

                // 日记
                if(e == '/pages/riji/riji'){
                    // #ifdef MP
                    if(self.vuex_site_config.sub_msg_diary.wechat){
                        uni.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_diary.wechat],
                            success (res) { }
                        })
                    }
                    // #endif

                    // #ifdef MP-TOUTIAO
                    if(self.vuex_site_config.sub_msg_diary.byte){
                        tt.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_diary.byte],
                            success (res) { }
                        })
                    }
                    // #endif
                }

                // 位置
                if(e == '/pages/weizhi/weizhi'){
                    // #ifdef MP
                    if(self.vuex_site_config.sub_msg_location.wechat){
                        uni.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_location.wechat],
                            success (res) { }
                        })
                    }
                    // #endif

                    // #ifdef MP-TOUTIAO
                    if(self.vuex_site_config.sub_msg_location.byte){
                        tt.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_location.byte],
                            success (res) { }
                        })
                    }
                    // #endif
                }

                // 100件小事
                if(e == '/pages/yibai/yibai'){
                    // #ifdef MP
                    if(self.vuex_site_config.sub_msg_small_things.wechat){
                        uni.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_small_things.wechat],
                            success (res) { }
                        })
                    }
                    // #endif

                    // #ifdef MP-TOUTIAO
                    if(self.vuex_site_config.sub_msg_small_things.byte){
                        tt.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_small_things.byte],
                            success (res) { }
                        })
                    }
                    // #endif
                }

                // 三生石
                if(e == '/pages/sanshengshi/sanshengshi'){
                    // #ifdef MP
                    if(self.vuex_site_config.sub_msg_stone.wechat){
                        uni.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_stone.wechat],
                            success (res) { }
                        })
                    }
                    // #endif

                    // #ifdef MP-TOUTIAO
                    if(self.vuex_site_config.sub_msg_stone.byte){
                        tt.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_stone.byte],
                            success (res) { }
                        })
                    }
                    // #endif
                }

                // 礼物中心
                if(e == '/pages/liwu/liwu'){
                    // #ifdef MP
                    if(self.vuex_site_config.sub_msg_gift.wechat){
                        uni.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_gift.wechat],
                            success (res) { }
                        })
                    }
                    // #endif

                    // #ifdef MP-TOUTIAO
                    if(self.vuex_site_config.sub_msg_gift.byte){
                        tt.requestSubscribeMessage({
                            tmplIds: [self.vuex_site_config.sub_msg_gift.byte],
                            success (res) { }
                        })
                    }
                    // #endif
                }

				uni.navigateTo({
					url:e
				})
			}
		}
	}
</script>

<style>
page{
	background: rgb(254, 197, 206);
}
.qlist{background: #fff;
	margin-bottom: 10px;
}
</style>
